package thinking.java.initalization.and.clean.up;

import java.util.Arrays;

/**
 * @author GaoFeng
 * @date 2020/1/3 11:23
 */
public class ArrayInit {
    public static void main(String[] args){

        // 只能在定义时使用
        Integer[] a = {new Integer(1),
                    new Integer(2), 3};

        // 通用初始化方式
        Integer[] b = new Integer[] {
                new Integer(1),
                new Integer(2),
                3
        };

        System.out.println(Arrays.toString(a));
        System.out.println(Arrays.toString(b));
    }
}
